package com.ly.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName t_user_wx_id
 */
@TableName(value ="t_user_wx_id")
@Data
public class UserWxIdEntity implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "uid")
    private Long uid;

    /**
     * 
     */
    @TableField(value = "gmt_create")
    private String gmtCreate;

    /**
     * 
     */
    @TableField(value = "gmt_modified")
    private String gmtModified;

    /**
     * wx唯一id
     */
    @TableField(value = "union_id")
    private String unionId;

    /**
     * 客户度openid
     */
    @TableField(value = "app_id")
    private String appId;

    /**
     * 服务号openid
     */
    @TableField(value = "service_number_id")
    private String serviceNumberId;

    /**
     * web端侧openid
     */
    @TableField(value = "web_id")
    private String webId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserWxIdEntity other = (UserWxIdEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getUnionId() == null ? other.getUnionId() == null : this.getUnionId().equals(other.getUnionId()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getServiceNumberId() == null ? other.getServiceNumberId() == null : this.getServiceNumberId().equals(other.getServiceNumberId()))
            && (this.getWebId() == null ? other.getWebId() == null : this.getWebId().equals(other.getWebId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getUnionId() == null) ? 0 : getUnionId().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getServiceNumberId() == null) ? 0 : getServiceNumberId().hashCode());
        result = prime * result + ((getWebId() == null) ? 0 : getWebId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uid=").append(uid);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", unionId=").append(unionId);
        sb.append(", appId=").append(appId);
        sb.append(", serviceNumberId=").append(serviceNumberId);
        sb.append(", webId=").append(webId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}